// -----------------------------------------------------------------------------
// Generate By Furion Tools v1.6.0                            
// -----------------------------------------------------------------------------

using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;

#nullable disable

namespace iemtm.WeChat.Core
{
    public partial class sysdiagrams : IEntity<MasterDbContextLocator>, IEntityTypeBuilder<sysdiagrams, MasterDbContextLocator>
    {

        public string name { get; set; }
        public int principal_id { get; set; }
        public int diagram_id { get; set; }
        public int? version { get; set; }
        public byte[] definition { get; set; }
    
        public void Configure(EntityTypeBuilder<sysdiagrams> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
                entityBuilder.HasKey(e => e.diagram_id)
                    .HasName("PK__sysdiagr__C2B05B618FD7A022");

                entityBuilder.HasIndex(e => new { e.principal_id, e.name }, "UQ__sysdiagr__532EC154A89A6926")
                    .IsUnique();

                entityBuilder.Property(e => e.name)
                    .IsRequired()
                    .HasMaxLength(128);
        }

    }
}

